package com.zhuiYun.project.api.slideshow.controller;

import com.zhuiYun.project.api.slideshow.service.SlideShowService;
import com.zhuiYun.project.common.errorCode.CommonException;
import com.zhuiYun.project.common.response.CommonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @ClassName: SlideShowController
 * @descriptions: pc轮播图
 * @Author: zq
 * @Date 2023/4/12 8:53
 */
@RestController
@Api(tags = "pc轮播图管理")
@RequestMapping("/slideShow")
@Slf4j
public class SlideShowController {
    @Resource
    SlideShowService slideShowService;

    /**
     * @description: pc轮播图管理index主页
     * @author: zq
     * @date: 2023/4/12 13:44
     * @param: []
     * @return: com.zhuiYun.project.common.response.CommonResult
    **/
    @GetMapping("/slideShowByType")
    @ApiOperation(value = "pc轮播图管理index主页")
    public CommonResult slideShowByType() throws CommonException {
        log.info("pc轮播图管理index主页");
        CommonResult commonResult = slideShowService.slideShowByType();
        return commonResult;
    }

    /**
     * @description: pc轮播图管理商品分类页
     * @author: zq
     * @date: 2023/4/12 14:16
     * @param: []
     * @return: com.zhuiYun.project.common.response.CommonResult
    **/
    @GetMapping("/slideShowByTypes")
    @ApiOperation(value = "pc轮播图管理商品分类页")
    public CommonResult slideShowByTypes() throws CommonException {
        log.info("pc轮播图管理商品分类页");
        CommonResult commonResult = slideShowService.slideShowByTypes();
        return commonResult;
    }

    /**
     * @description: pc轮播图管理DIY页
     * @author: zq
     * @date: 2023/4/12 14:28
     * @param: []
     * @return: com.zhuiYun.project.common.response.CommonResult
    **/
    @GetMapping("/slideShowByTypeDiy")
    @ApiOperation(value = "pc轮播图管理DIY页")
    public CommonResult slideShowByTypeDiy() throws CommonException {
        log.info("pc轮播图管理DIY页");
        CommonResult commonResult = slideShowService.slideShowByTypeDiy();
        return commonResult;
    }
}
